﻿using System;
using System.Net;
using System.ComponentModel;
using System.Collections.Generic;

/// <summary>
/// Summary description for MikeKappel
/// </summary>
namespace csToolkit.Data.BindingLists
{
    /// <summary>
    /// Step Binding List
    /// </summary>
    [Serializable]
    public class StepBindingList : BindingList<Step>
    {
        public StepBindingList(Int64 Start, Int64 End, Int64 Increment)
        {
            for (Int64 i = Start; i <= End; )
            {   
                this.Add(new Step(i.ToString(),i)); 
                i = i + Increment;
            }

        }
    }

    /// <summary>
    /// Step Items
    /// </summary>
    [Serializable]
    public class Step
    {
        private String text;
        private Int64 number;
        public Step(String Text, Int64 Number)
        {
            text = Text;
            number = Number;
        }

        public String Text
        {
            get { return text; }
            set { text = value; }
        }
        public Int64 Number
        {
            get { return number; }
            set { number = value; }
        }
        public override string ToString()
        {
            return text;
        }
    }
}
